#pragma once
#ifndef TRADEMANAGER_H
#define TRADEMANAGER_H

#include "BaseTradeProvider.h"

namespace SmartTrade{
	class TradeManager
	{
	public:
		TradeManager(void);
		~TradeManager(void);
	public:
		void ConnectToProvider(const string& strProvName,const string& strAddresses,
				const string& strBrokerId,const string& strLoginId,const string& strPassword,
				const string& strUserProductInfo,const string& strAuthCode);
		void DisconnectToProvider(const string& strProvName);
		SmartTradecInstrument** GetInstrument(const string& strProvName,int* arrayLen);
		Ptr_BaseTradeProvider CreateProvider(const string& strProvName);
		Ptr_BaseTradeProvider FindProvider(const string& strProvName);
	private:
		Ptr_TradeProviderMap pTradeProvMap_;
	};

	typedef Loki::SingletonHolder<TradeManager> SingletonTradeManager;
}

#endif // TRADEMANAGER_H

